package net.yondervision.hrfsp.sdk.esign.domain.request;

import cn.hutool.http.Method;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import net.yondervision.hrfsp.sdk.esign.domain.AbstractESignRequest;
import net.yondervision.hrfsp.sdk.esign.domain.ESignRequest;
import net.yondervision.hrfsp.sdk.esign.domain.request.path.SignflowsDocumentsSearchWordsPositionParamPath;
import net.yondervision.hrfsp.sdk.esign.domain.request.query.SignflowsDocumentsSearchWordsPositionParamQuery;
import net.yondervision.hrfsp.sdk.esign.domain.response.SignflowsDocumentsSearchWordsPositionResponse;

/**
 * @author Cash Zhang
 * @version v1.0
 * @since 2019/09/28 14:39
 */
@Data
@Builder
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
public class SignflowsDocumentsSearchWordsPositionRequest extends AbstractESignRequest implements
    ESignRequest<SignflowsDocumentsSearchWordsPositionResponse> {

  private SignflowsDocumentsSearchWordsPositionParamPath signflowsDocumentsSearchWordsPositionParamPath;
  private SignflowsDocumentsSearchWordsPositionParamQuery signflowsDocumentsSearchWordsPositionParamQuery;

  public SignflowsDocumentsSearchWordsPositionRequest(
      SignflowsDocumentsSearchWordsPositionParamPath signflowsDocumentsSearchWordsPositionParamPath,
      SignflowsDocumentsSearchWordsPositionParamQuery signflowsDocumentsSearchWordsPositionParamQuery) {
    this.signflowsDocumentsSearchWordsPositionParamPath = signflowsDocumentsSearchWordsPositionParamPath;
    this.signflowsDocumentsSearchWordsPositionParamQuery = signflowsDocumentsSearchWordsPositionParamQuery;
    this.setParamPath(signflowsDocumentsSearchWordsPositionParamPath);
    this.setParamQuery(signflowsDocumentsSearchWordsPositionParamQuery);
  }

  @Override
  public String getUrl() {
    return "/signflows/{flowId}/documents/{fileId}/searchWordsPosition";
  }

  @Override
  public Method getMethodType() {
    return Method.GET;
  }

  @Override
  public Class<SignflowsDocumentsSearchWordsPositionResponse> getResponseClass() {
    return SignflowsDocumentsSearchWordsPositionResponse.class;
  }

}
